
srcdir = .
LDFLAGS = -Wl,-elf2flt="-r -z -s 32768"
CFLAGS = -O2 -fomit-frame-pointer -fno-builtin -fpic -msingle-pic-base
LIBS = 
LPTHREAD = -lpthread

CC = arm-elf-gcc

TARGET = transport.out
OBJS = server.o cmdbufqueue.o buf2serial.o sock2buf.o serial2sock.o serial.o socket.o

$(TARGET): $(OBJS)
	$(CC) $^  $(LIBS) $(LDFLAGS) $(CFLAGS) $(LPTHREAD) -o $@
%.o: %.c
	$(CC) -c $<  $(LIBS) $(LDFLAGS) $(CFLAGS) -o $@
	
clean:
	rm -rf $(OBJS) $(TARGET) $(TARGET).gdb   

